/*
package com.heitian.ssm.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

*/
/**
 * Created with IntelliJ IDEA.
 * User: mishuai
 * Date: 2018-04-20
 * Time: 12:16
 * Des:
 *//*

@Controller
@RequestMapping("/regist")
public class RegisterController {

    @RequestMapping("/jsonSelectUser")
    @ResponseBody
    public Map<String,Integer> selectUserByEmail(@RequestParam("email") String email){
        User user = webService.selectUserByEmail(email);

        Map<String,Integer> map = new HashMap<>();

        if(user==null){
            map.put("state", 0);
        }else{
            map.put("state", 1);
        }

        return map;
    }

    @PostMapping("/insertUser.do")
    @ResponseBody
    public Map<String, Object> insertUser(@RequestParam("email") String email,
                                          @RequestParam("password") String password) throws Exception {

        Map<String, Object> map = new HashMap<>();

        int code = webService.insertUser(email, password);

        if (code > 0) {
            map.put("code", SUCCESS_CODE);
            map.put("message", "添加成功");
            return map;
        } else {
            map.put("code", ERROR_CODE);
            map.put("message", "添加失败");
            return map;
        }

    }
}
*/
